---
title: "Balancing algorithm report"
output:
  html_document:
    df_print: paged
editor_options:
  chunk_output_type: console
---

```{r,message=FALSE,echo=FALSE}
library(dplyr)
```

```{r,echo=FALSE}
# Supply a "MyData.csv" to the directory,
# where column 1 of csv is the ID
clean <- read.csv("finland_clean.csv")
MyData=clean
write.csv(MyData,"MyData.csv",row.names = F)
MyData <- read.csv("MyData.csv")
```

# Python (config = code) 
```{python engine.path="/usr/bin/python3.5",results='hide'}
import sys
sys.path.append('/home/shared/data/balancing/')
import drop
config = "{1: {'degreeHigh':8.6,'noDegreeHigh':40.8,'degreeLow':19.0,'noDegreeLow':31.6}},{2: {'interest':64.1,'LowInterest':35.9}},{3: {'Male':48.6,'Female':51.4}},{4: {'KOK':18.42,'KESK':16.04,'PS':10.50,'SDP':10.04,'VIHR':7.61,'V':7.60,'SFP':5.51,'KD':4.28,'Undec':20.00}}"

filename = '/home/fernando/Misc/bjpolFinal/Finland/MyData.csv'

drop.run(config, filename, "/home/fernando/Misc/bjpolFinal/Finland/myBal", 3)
```

